home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 44 / Amiga Format CD44 (1999-08-26)(Future Publishing)(GB)(Track 1 of 3)[!][issue 1999-10].iso / -in_the_mag- / basics / amos / amosmultienv11.lha / AmosMultiEnv / Install_AMOSMultiEnv < prev    next >
Text File  |  1992-02-26  |  5KB  |  206 lines

  1. (transcript "Installing AMOS Loader...")
  2.  
  3. (message "AMOS Multi-Envoironment Loader System V1.1\n\nBy Paul Hickman (ph@doc.ic.ac.uk)\n\n\nThis script will patch AMOS V1.36, and install the loader programs on your AMOS disk/directory\n\nReqtools library is required, and this will be copied to LIBS: if the version supplied here is newer than your current version")
  4. (welcome)
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11. ;get the users AMOS directory.
  12.  
  13. (set #AMOS 
  14.     (askdir
  15.     (prompt "Please select your AMOS disk/directory.") 
  16.     (help @ask-dirhelp)
  17.     (default "AMOS:")
  18.     (newpath)
  19.     )
  20. )
  21.  
  22. (set @default-dest #AMOS)
  23. (complete 5)
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31. ; Now detect if the AMOS directory is infact the root directory of
  32. ; volume AMOS.
  33.  
  34. (set AMOSdisk (= (getassign (getdevice #AMOS) "d") "AMOS:"))
  35.  
  36.  
  37.  
  38.  
  39.  
  40. ;Now copy reqtools library to LIBS: if necessary
  41.  
  42. (copylib
  43.     (help @copylib-help)
  44.     (prompt "Installing ReqTools.Library...")
  45.     (source "Reqtools.library")
  46.     (dest "libs:")
  47.     (confirm)
  48.     (noposition)
  49. )
  50.  
  51. (complete 15)
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59. ;Now check that there is a valid patchable copy of AMOS V1.36 in the AMOS
  60. ;directory.
  61.  
  62.  
  63. (set #amos13 (tackon #AMOS "AMOS1.3"))
  64. (If (= (exists #AMOS13) 0)
  65.    (abort "The file AMOS1.3 appears to be missing from the AMOS directory you selected!\n\nPlease try again with the correct directory.")
  66. )
  67.  
  68.  
  69. (If (<> (getsize #AMOS13) 93392)
  70.     (abort (cat "The length of the AMOS V1.36 should be 93392 bytes, but your copy is " (getlength #AMOS13) " bytes long.\n\n Please replace it with an original uncrunched copy of AMOS1.36."))
  71. )
  72.  
  73.  
  74. (complete 20)
  75.  
  76. ;Now patch it. An already patched copy can safely be re-patched.
  77.  
  78. (working "Patching File AMOS1.3")
  79. (run (cat "PatchAMOS " (tackon #AMOS "AMOS1.3")))
  80.  
  81.  
  82. (complete 30)
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90. ;Now copy the program files accross
  91.  
  92. (copyfiles
  93.     (help @copyfiles-help)
  94.     (prompt "Installing AMOS Loader")
  95.     (source "GetAMOSEnv")
  96.     (noposition)
  97.     (dest #AMOS)
  98. )
  99.  
  100. (complete 40)
  101.  
  102. (copyfiles
  103.     (help @copyfiles-help)
  104.     (prompt "Installing New AMOS Icon")
  105.     (source "AmosIcon")
  106.     (newname "Amos.info")
  107.     (noposition)
  108.     (dest #AMOS)
  109. )
  110.  
  111. (complete 50)
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119. ; Now prepare some variables for the script file.
  120.  
  121.  
  122. (set #AMOSsystem 
  123.     (askdir
  124.         (prompt "Please select your AMOS_System directory.") 
  125.         (help @ask-dirhelp)
  126.         (default (tackon #AMOS "AMOS_System"))
  127.         (newpath)
  128.     )
  129. )
  130.  
  131. (complete 60)
  132.  
  133.  
  134.  
  135.  
  136.  
  137. ;Now get the users extra commands for the script file.
  138.  
  139. (set #extracommands "")
  140. (set #command "5")
  141.  
  142. (until (= #command "")
  143.  
  144.     (set #command
  145.         (askstring
  146.             (prompt "A Script file is created by this installer to load AMOS. If you would like to insert extra commands into this script just before AMOS is run, type each one into the string gadget below, and press proceed.\n\nPress proceed with the string gadget empty when finished.")
  147.             (help (cat "Type each command into the string gadget, "
  148.                    "and then press proceed.\n\nWhen you have "
  149.                    "finished, press proceed with the string gadget empty.\n\n"
  150.                    "The commands you enter will be executed just before "
  151.                    "AMOS1.3 is run, and only if AMOS1.3 is going to be "
  152.                    "executed - If you press Cancel in the file requester,"
  153.                    "or an error occurs, your commands will NOT be run.\n\n"
  154.                    "The most likely commands you will want to insert here "
  155.                    "are to setup assigns to the directories where you keep "
  156.                    "your AMOS programs."))
  157.             (default "")
  158.         )
  159.     )
  160.  
  161.     (set #extracommands
  162.         (cat #extracommands "    " #command "\n")
  163.     )
  164. )
  165.  
  166. (complete 60)
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173. ; Next, create the script
  174.  
  175. (textfile
  176.     (prompt "Creating AMOS Loader Script")
  177.     (help "No Help Available")
  178.     (dest (tackon #AMOS "Amos"))
  179.     (append ".key prog\n.bra {\n.ket }\n")
  180.     (append "; $VER: Amos Loader 1.1 (13.3.94)\n;\n; By Paul Hickman (ph@doc.ic.ac.uk)\n\n\n")
  181.     (append "FailAt 11\n")
  182.     (if (= AMOSdisk 0)
  183.         (append (cat (cat "assign AMOS: \"" (expandpath #AMOS)) "\"\n"))
  184.     )
  185.     (append (cat (cat "GetAMOSEnv \"" #AMOSsystem) "\"\n"))
  186.     (append "IF NOT WARN\n    CD AMOS:\n\n")
  187.     (append #extracommands)
  188.     (append "    AMOS:AMOS1.3 {prog}\n    C:Delete T:AMOS1_3.Env\nENDIF\n")
  189. )
  190.  
  191. (complete 80)
  192.  
  193.  
  194.  
  195.  
  196.  
  197. ; Finally, if on a floppy disk, user may wish startup sequence modified
  198.  
  199.  
  200. (if (= AMOSdisk 1)
  201.     (message "I notice you are installing this to a floppy disk.\n\nTo use the AMOS Envoironment selector, you must double click on the AMOS loader icon.\n\n\nYou should make sure that your startup-sequence loads workbench, not AMOS directly.")
  202. )
  203.  
  204. (complete 100)
  205. (exit "\nTo load AMOS, double click on the \"Amos\" icon, instead of the old \"AMOS1.3\" icon.\n\n\n\n© Paul Hickman - March 1994")
  206.